package bigdata.backend.datasource.utils;

import lombok.Data;

@Data
public class SyncTableResult {
    private final boolean success;
    private final String sql;
    private final String message;
    private final String error;

    private SyncTableResult(boolean success, String sql, String message, String error) {
        this.success = success;
        this.sql = sql;
        this.message = message;
        this.error = error;
    }

    public static SyncTableResult success(String sql, String message) {
        return new SyncTableResult(true, sql, message, null);
    }

    public static SyncTableResult failure(String sql, String error) {
        return new SyncTableResult(false, sql, null, error);
    }

}
